package com.xy.biz.auth.domain.converter;

import com.xy.biz.auth.domain.bo.UserLogStatusBO;
import com.xy.biz.auth.domain.dto.UserLogStatusDTO;
import com.xy.biz.auth.domain.po.UserLogStatusPO;
import com.xy.tool.util.BeanUtilsEx;

import java.util.Collection;
import java.util.List;

/**
 * 
 * 
 * @author zsp
 * @date 2020-8-20
 */
public class UserLogStatusConverter {
	
	public static UserLogStatusPO toPO(UserLogStatusBO source) {
		return BeanUtilsEx.copyProperties(source, () -> new UserLogStatusPO(), true);
	}
	
	public static List<UserLogStatusPO> toPO(Collection<UserLogStatusBO> source) {
		return BeanUtilsEx.copyPropertiesForNewList(source, () -> new UserLogStatusPO(), true);
	}
	
	public static UserLogStatusBO fromPO(UserLogStatusPO source) {
		return BeanUtilsEx.copyProperties(source, () -> new UserLogStatusBO());
	}
	
	public static List<UserLogStatusBO> fromPO(Collection<UserLogStatusPO> source) {
		return BeanUtilsEx.copyPropertiesForNewList(source, () -> new UserLogStatusBO());
	}
	
	public static UserLogStatusDTO toDTO(UserLogStatusBO source) {
		return BeanUtilsEx.copyProperties(source, () -> new UserLogStatusDTO());
	}
	
	public static List<UserLogStatusDTO> toDTO(Collection<UserLogStatusBO> source) {
		return BeanUtilsEx.copyPropertiesForNewList(source, () -> new UserLogStatusDTO());
	}
	
//	public static UserLogStatusQuery toQuery(ListUserLogStatusRequest source) {
//		if(null == source) {
//			return null;
//		}
//		UserLogStatusQuery target = new UserLogStatusQuery(source.getPageIndex(), source.getPageSize());
//		BeanUtilsEx.copyProperties(source, target);
//		return target;
//	}

}
